package kr.ac.kookmin.cs.random;

import java.math.BigInteger;

import kr.ac.kookmin.cs.randomtest.RandomNumberSequenceGenerator;

public class MyRandom extends RandomNumberSequenceGenerator {

	private long[] primes = new long[]{17L, 103L, 797L, 1031L, 1811L, 7883L, 129953L, 2636243L, 6023029L, 9600037L, 15251983L, 136940431L, 2321690141L};
	
	private long next = 0L;
	private int primeIndex = 0;
	
	@Override
	public void initialize(long seed){
		super.initialize(seed);
		next = 0L;
		primeIndex = 0;
		next = getSeed();
	}

	@Override
	protected long getNextRandomNumber() {
		
		next &= 0x00000000ffffffffL;
		return next++;
	}

	@Override
	protected long getRandomNumberWithSeed(long seed) {
		
		initialize(seed);
		
		return getNextRandomNumber();
	}
	
	public static void main(String[] args){
		
		MyRandom mpr = new MyRandom();
		mpr.initialize(1);
		
		for(int i = 0 ; i < 100 ; i++){
			System.out.println(mpr.getNextRandomNumber());
		}
	}
}
